# coding: utf-8
try:
    import re
    import os
    import sys
    import time
    import requests
    import random
    import hashlib
    import json
    import socket
    import string
    import base64
    from urllib.parse import quote
    from Crypto.Cipher import AES, PKCS1_OAEP
    from Crypto.Cipher import PKCS1_v1_5 as Cipher_pksc1_v1_5
    from Crypto.PublicKey import RSA
    import asyncio
    import aiohttp
    from websocket import create_connection
    from yy_login import addtask
except Exception as E:
    t = re.findall("d '(.*?)'", str(E))[0]
    print(f'{t}依赖未安装')
    sys.exit()

"""
@ cron: 2 * * * *
@ new Env('云游世界会员版')       
@ 配置文件和脚本要放同一目录
@ 版本  0.7
"""

##################################配置区##################################
text = ''  # 卡密
kdj = 3  # 卡多少个37级   没到38级设置2个
lve_l = 9   # 默认9 脚本卡住不动设置为8    设置8 会一直回收低级建筑谨慎设置
battery = 85  # 电量低于就开始用云豆加满电量
##################################配置区##################################
#----------------------------------------------------------------------------------------------------------------------
# 随机字母数字
def generator(str_size):
    return ''.join(random.choice(string.ascii_lowercase) for x in range(str_size))
# rsa加密
def public_key_encrypt(text_1):
    rsakey = RSA.importKey(public_key)
    cipher = Cipher_pksc1_v1_5.new(rsakey)
    cipher_text = base64.b64encode(cipher.encrypt(text_1.encode()))
    return cipher_text.decode()
# aes加密
BLOCK_SIZE = 16

def pad(s): return s + (BLOCK_SIZE - len(s) % BLOCK_SIZE) * \
                   chr(BLOCK_SIZE - len(s) % BLOCK_SIZE)

def unpad(s): return s[:-ord(s[len(s) - 1:])]

def AES_Encrypt(key, data):
    da = pad(data)
    cipher = AES.new(key.encode('utf8'), AES.MODE_CBC, iv.encode('utf8'))
    encryptedbytes = cipher.encrypt(da.encode('utf8'))
    encodestrs = base64.b64encode(encryptedbytes)
    enctext = encodestrs.decode('utf8')
    return enctext
def AES_Decrypt(key, text):
    data = text.encode('utf8')
    encodebytes = base64.decodebytes(data)
    cipher = AES.new(key.encode('utf8'), AES.MODE_CBC, iv.encode('utf8'))
    text_decrypted = cipher.decrypt(encodebytes)
    text_decrypted = unpad(text_decrypted)
    text_decrypted = text_decrypted.decode('utf8')
    return text_decrypted

# 异步请求
async def post_json(url, headers, data):
    async with aiohttp.ClientSession() as session:
        async with session.post(url=url, headers=headers, data=data, ssl=False) as resp:
            return await resp.text()

#----------------------------------------------------------------------------------------------------------------------

##################################下面不要动##################################
git ='https://gitee.com'#line:1
host ='https://yy.pattin.top'#line:2
url_code ='http://125.91.127.111:1111'#line:3
user ='2313b428183b1a0f5280a7971049b2ce'#line:4
iv ='9LEDKHWVF2YIT5K4'#line:5
public_key ='-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCXLYCjqsDNKwyb4XuaYSO7VB1PzSVMtPQdRePyG266BTtv3pixLoGXJVcrGtLKdcvQUMmgpHrJTeKWlYSMOa1tWH732VMMb13pS8xm+VPeUq84JSg/g9ZaSSY6/DWGmQWDdGZS4ipcpbNWT99MRSCZa9noJxDkPJWE6AQV0+HzSwIDAQAB\n-----END PUBLIC KEY-----'#line:6
def find_member_positions (O00OOOOOOO0O0OOO0 ,OOOOOO0O0O000OOOO ):#line:9
    OO0OO000O000OO00O =[]#line:10
    for OO0OO000OOOO0O0O0 ,OOOOOOOOOOOOO00OO in enumerate (OOOOOO0O0O000OOOO ):#line:11
        if OOOOOOOOOOOOO00OO ==O00OOOOOOO0O0OOO0 :#line:12
            OO0OO000O000OO00O .append (OO0OO000OOOO0O0O0 )#line:13
    return OO0OO000O000OO00O #line:14
def ubbbf ():#line:17
    print ('卡密验证通过   ✅')#line:18
def alal ():#line:21
    return 'vasttttt/hairy/raw/master'#line:22
def gitee_edition ():#line:25
    try :#line:26
        return requests .get (f'{git}/{alal()}/edition').json ()#line:27
    except :#line:28
        sys .exit (0 )#line:29
def OO00OO0OO0OO00OO00o0 ():#line:32
    return hashlib .md5 ((socket .gethostbyname (get_ip ())+socket .getfqdn (socket .gethostname ())+'10086').encode ('utf-8')).hexdigest ().upper ()#line:34
def O000OO0O00OO00O00 ():#line:37
    O000O00000OO0O00O ={'user':user ,'text':text ,'Carmi':OO00OO0OO0OO00OO00o0 ()}#line:38
    O0OO0OOO0O0OO0000 =requests .request ('post',f'{url_code}/configure',data =O000O00000OO0O00O ).json ()#line:39
    if 'code'in O0OO0OOO0O0OO0000 :#line:40
        if O0OO0OOO0O0OO0000 ['code']==200 :#line:41
            if O0OO0OOO0O0OO0000 ['data']['conf']:#line:42
                ubbbf ()#line:43
            else :#line:44
                print (oyoy ())#line:45
                exit (3 )#line:46
        else :#line:47
            print ('开始绑定激活卡密')#line:48
            O00O0OOOO0O00OO0O =requests .request ('post',f'{url_code}/validation',data =O000O00000OO0O00O ).json ()#line:49
            if 'code'in O00O0OOOO0O00OO0O :#line:50
                if O00O0OOOO0O00OO0O ['code']==200 :#line:51
                    print (O00O0OOOO0O00OO0O ['data']['msg'])#line:52
            print (oyoy ())#line:53
            exit (2 )#line:54
    else :#line:55
        print (oyoy ())#line:57
        exit (1 )#line:58
def get_ip ():#line:61
    return re .findall ('ip: (.*) ',requests .request ('get','https://dev.kdlapi.com/testproxy',headers ={"Accept-Encoding":"Gzip"}).text )[0 ]#line:62
def gitee_validation ():#line:65
    return requests .request ('get',f'{git}/{alal()}/validation').json ()#line:66
def oyoy ():#line:69
    return '卡密未激活   ❌'#line:70
edition =gitee_edition ()#line:73
def O000OO000O0O00OOO00 ():#line:76
    try :#line:77
        if version_of_the_validation ()<edition ['Roam_vip']['edition']:#line:78
            print (f'当前版本=>> {version_of_the_validation()}'+f'丨远程版本=>> {edition["Roam_vip"]["edition"]}   ❌')#line:79
            print (f'更新内容=>>{edition["Roam_vip"]["content"]}')#line:80
        else :#line:81
            print (f'当前版本=>> {version_of_the_validation()}'+f'丨远程版本=>> {edition["Roam_vip"]["edition"]}   ✅')#line:82
            print (f'更新内容=>> {edition["Roam_vip"]["content"]}')#line:83
    except Exception as O00000OOO0OOO0OOO :#line:84
        print (O00000OOO0OOO0OOO )#line:85
def version_of_the_validation ():#line:88
    return str ((63 -56 )/10 )#line:89
json_path ="Roam_vip_data.json"#line:92
json_path1 ="Roam_vip_data.json"#line:93
dict ={}#line:94
def get_json_data (OO0O0OOO0OOO00O00 ,O00OO0O00O0OOOOOO ,O000OOOO0O0O0O000 ,O0O0O0000OO0OO0OO ,O0OOO0OOOO0O00O0O ,O0OOOO0O0OO0OOO0O ):#line:97
    with open (OO0O0OOO0OOO00O00 ,'rb')as O000000O0O0O000O0 :#line:98
        OO0OO0O0O00O0O0OO =json .load (O000000O0O0O000O0 )#line:99
        OO0OO0O0O00O0O0OO ['data'][O00OO0O00O0OOOOOO ][O000OOOO0O0O0O000 ]=O0O0O0000OO0OO0OO #line:100
        OO0OO0O0O00O0O0OO ['data'][O00OO0O00O0OOOOOO ][O0OOO0OOOO0O00O0O ]=O0OOOO0O0OO0OOO0O #line:101
        O00OO0O00O0O00O0O =OO0OO0O0O00O0O0OO #line:102
    O000000O0O0O000O0 .close ()#line:103
    return O00OO0O00O0O00O0O #line:104
def write_json_data (O0O0OOO0OO0OO00OO ):#line:107
    with open (json_path1 ,'w')as OO0O000OOO0O0OO0O :#line:108
        json .dump (O0O0OOO0OO0OO00OO ,OO0O000OOO0O0OO0O ,indent =2 ,sort_keys =True ,ensure_ascii =False )#line:109
    OO0O000OOO0O0OO0O .close ()#line:110
    return True #line:111
async def receive_coins (OO00O0O0OO0000OO0 ,OOO00000OOO00OO00 ,O0000OO0OOOO0O0OO ):#line:114
    try :#line:115
        O0OO0O0O0OOOOO0O0 ={"type":30 ,"member_id":O0000OO0OOOO0O0OO ,"secret":"zBycOs2LZQ0qA46HNU8pwnb1xEPTQQ4biK0l+gIc4LSgHXqs62w091ZPCYFfo30kmUhBUJYVHhYgM6FX3nKAFvUUNi8mSZisr6ywCLj1OFnWCovjrEuBstH2MWHMF/jAtdeNZW2MQNbH4vYX3l1gmdFAuPKO8mnSHgQCzpK1Ht7GTjGXr5XV3n1rpc8rj/dauZLXwM+LUfd2hCJT9EG8u+j+02WcIkVhx9TrFsaR3JUTwLHnOVegd1TN5Kfh9b1vaUXZo2vjM1IgL1niEH/ElK2Xr2QJv/yCmW5lg7aMHOoEey1zT1so/3HK+kNWlJc5m1OVpqPtN6mDuYKMskJOFtzLHvZGRQu7W80x1IrBHGDUHT3BLaStba5CyEYpS8f6D3g9NuWWYPoE14aDO/+WvTl4de2tGRuhE3IuGGpITd7jrsMOtp0y6fBIwxx+F+T5VQSkALz4Kcqehextw366vB0nam4GN3J98RiBbgex7RULFkMoN3Pca/SwAVV0iqRq/70eHRKvGSbM99aJv8FT+z5WVpgiiP36MM0sXODTDbGoIhluEPiTL81AYa4v0Ci1VRyzynOOVZbfKFR9F1KVOD+Y+gmyk3GUJUDEnxBmROTpBUZn3nMwiHjDT8slUQ9J9bAVoVhToKEuewI7DrZfDXB39i/ulwcG3+tnde1Ikgo=","token_key":OO00O0O0OO0000OO0 ['token_key'],"token_value":OO00O0O0OO0000OO0 ['token_value']}#line:118
        OO0O00O0OO0OOOO00 =create_connection ("ws://socket.yunyoushijie.net/socket")#line:119
        OO0O00O0OO0OOOO00 .send (json .dumps (O0OO0O0O0OOOOO0O0 ))#line:120
        O0O0O000OOO0000O0 =json .loads (OO0O00O0OO0OOOO00 .recv ())#line:121
        if 'result'in O0O0O000OOO0000O0 :#line:122
            O00OOOO0000O0000O =O0O0O000OOO0000O0 ['result'][0 ]['divide_number']#line:123
            O0O0OOO0000OOOOO0 =O0O0O000OOO0000O0 ['result'][0 ]['total_ticket']#line:124
            OO0OOO0OOOOO00O0O =O0O0O000OOO0000O0 ['result'][0 ]['my_active_ticket']#line:125
            O000OO00O00O000OO =((float (O00OOOO0000O0000O )*1440 )/float (O0O0OOO0000OOOOO0 ))*float (OO0OOO0OOOOO00O0O )#line:126
            print (f'[账号{OOO00000OOO00OO00 + 1}]活跃在线->预计每日中:{int(O000OO00O00O000OO * 1000) / 1000}云豆')#line:127
        OO0O00O0OO0OOOO00 .close ()#line:128
    except Exception as O0OOO00O00O0OOO0O :#line:129
        print (O0OOO00O00O0OOO0O )#line:130
async def member_info (OOO00O00OOOO0O0O0 ,OOO00OOO0OO0OO00O ):#line:134
    try :#line:135
        OO00OOOOOOO0O000O =generator (16 )#line:136
        OO0OOO0O00O0OOO00 =str (int (time .time ()))#line:137
        O0OO0OOOOO000O0O0 ={'sKey':public_key_encrypt (OO00OOOOOOO0O000O ),'user-agent':'Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Html5Plus/1.0 (Immersed/44) uni-app','Content-Type':'application/x-www-form-urlencoded','Host':'game.yunyoushijie.net'}#line:140
        OO0OO00OOOO0OO00O ='token_value='+OOO00O00OOOO0O0O0 ['token_value']+'&token_key='+OOO00O00OOOO0O0O0 ['token_key']+'&service_time='+OO0OOO0O00O0OOO00 #line:142
        O000OO00OOOOO0O00 =quote (AES_Encrypt (key =OO00OOOOOOO0O000O ,data =OO0OO00OOOO0OO00O ),'utf-8')#line:143
        O0000OO0OOOO0O000 =str ('token_value='+OOO00O00OOOO0O0O0 ['token_value']+'&token_key='+OOO00O00OOOO0O0O0 ['token_key']+'&service_time='+OO0OOO0O00O0OOO00 +'&l_sign='+O000OO00OOOOO0O00 )#line:145
        O00000000O0OOO0OO =json .loads (AES_Decrypt (OO00OOOOOOO0O000O ,await post_json (f'{host}/member/info',headers =O0OO0OOOOO000O0O0 ,data =O0000OO0OOOO0O000 )))#line:146
        O000O0O0OOOO0O000 =json .loads (AES_Decrypt (OO00OOOOOOO0O000O ,await post_json (f'{host}/wallet/balance',headers =O0OO0OOOOO000O0O0 ,data =O0000OO0OOOO0O000 )))#line:147
        O0O0O00000O00O0O0 =await largest (OOO00O00OOOO0O0O0 )#line:148
        if 'code'in O00000000O0OOO0OO :#line:150
            if O00000000O0OOO0OO ['code']==10000 :#line:151
                O0OOO00OO00OOOOOO =str (O00000000O0OOO0OO ['result']['name'])[:6 ]#line:152
                O0O000O0OOO000OOO =O00000000O0OOO0OO ['result']['id']#line:153
                print (f'[账号{OOO00OOO0OO0OO00O + 1}]->昵称:{O0OOO00OO00OOOOOO}丨ID:{str(O0O000O0OOO000OOO)[:2] + "**" + str(O0O000O0OOO000OOO)[4:]}丨等级:{O0O0O00000O00O0O0}丨云豆:{int(float(O000O0O0OOOO0O000["result"][0]["num"]) * 1000) / 1000}')#line:155
                await receive_coins (OOO00O00OOOO0O0O0 ,OOO00OOO0OO0OO00O ,O0O000O0OOO000OOO )#line:156
                return True #line:157
            if O00000000O0OOO0OO ['code']==10100 :#line:158
                print (f'[账号{OOO00OOO0OO0OO00O + 1}]->账号失效')#line:159
                if OOO00O00OOOO0O0O0 ['elephant_user']=='f':#line:160
                    print (f'[账号{OOO00OOO0OO0OO00O + 1}]->该ID是用户扫码登录跳过')#line:161
                    return True #line:162
                OO00OOOOO0O00O000 =addtask (elephant_user =OOO00O00OOOO0O0O0 ['elephant_user'],elephant_pswd =OOO00O00OOOO0O0O0 ['elephant_pswd'],elephant_Task_ID =OOO00O00OOOO0O0O0 ['elephant_Task_ID'])#line:164
                O00O000000OO00OO0 =OO00OOOOO0O00O000 [0 ]#line:165
                O0OO00OOO0O000OO0 =OO00OOOOO0O00O000 [1 ]#line:166
                O000OOOO000OOOO00 =get_json_data (json_path ,OOO00OOO0OO0OO00O ,'token_key',O00O000000OO00OO0 ,'token_value',O0OO00OOO0O000OO0 )#line:167
                if write_json_data (O000OOOO000OOOO00 ):#line:168
                    print (f'[账号{OOO00OOO0OO0OO00O + 1}]->正在写入账号配置文件')#line:169
                return False #line:170
        return False #line:171
    except Exception as OOO0OO0O0OOO00O0O :#line:172
        print (OOO0OO0O0OOO00O0O )#line:173
async def income_offline (O00OO00OO0O0OO0OO ,OOO0OOO00O0O00OO0 ,O0O0O0OO000000OOO ,OO0OO0OOO0OO00OOO ):#line:179
    try :#line:180
        OO0OO00O0OO000O00 =generator (16 )#line:181
        OOOO00O0O00000O00 =str (int (time .time ()))#line:182
        O00000O000O0O0O0O ={'sKey':public_key_encrypt (OO0OO00O0OO000O00 ),'user-agent':'Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Html5Plus/1.0 (Immersed/44) uni-app','Content-Type':'application/x-www-form-urlencoded','Host':'game.yunyoushijie.net'}#line:185
        OOOOO0O0O00OOOOO0 ='token_value='+O00OO00OO0O0OO0OO ['token_value']+'&token_key='+O00OO00OO0O0OO0OO ['token_key']+'&service_time='+OOOO00O0O00000O00 #line:187
        O000O0O0OO00O00O0 =quote (AES_Encrypt (key =OO0OO00O0OO000O00 ,data =OOOOO0O0O00OOOOO0 ),'utf-8')#line:188
        O0OOOOO0O0O0O0000 =str ('token_value='+O00OO00OO0O0OO0OO ['token_value']+'&token_key='+O00OO00OO0O0OO0OO ['token_key']+'&service_time='+OOOO00O0O00000O00 +'&l_sign='+O000O0O0OO00O00O0 +'&type_id='+str (O0O0O0OO000000OOO ))#line:190
        OO0OO0OO0O0000OO0 =json .loads (AES_Decrypt (OO0OO00O0OO000O00 ,await post_json (f'{host}/income/offline',headers =O00000O000O0O0O0O ,data =O0OOOOO0O0O0O0000 )))#line:191
        if 'code'in OO0OO0OO0O0000OO0 :#line:192
            if OO0OO0OO0O0000OO0 ['code']==10000 :#line:193
                print (f'[账号{OOO0OOO00O0O00OO0 + 1}]{OO0OO0OOO0OO00OOO}->{OO0OO0OO0O0000OO0["message"]}')#line:194
                return False #line:195
            else :#line:196
                print (f'[账号{OOO0OOO00O0O00OO0 + 1}]{OO0OO0OOO0OO00OOO}->{OO0OO0OO0O0000OO0["message"]}')#line:197
                return True #line:198
    except Exception as OO0OO00OOO0OO0000 :#line:199
        print (OO0OO00OOO0OO0000 )#line:200
async def largest (O0O0OO0O0O0O0O0OO ):#line:204
    try :#line:205
        O0OO00O000O000000 =[]#line:206
        O00OOO0O000O00O00 =generator (16 )#line:207
        OO0O0OO0OOO000000 =str (int (time .time ()))#line:208
        O0OO00000OO00O0OO ={'sKey':public_key_encrypt (O00OOO0O000O00O00 ),'user-agent':'Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Html5Plus/1.0 (Immersed/44) uni-app','Content-Type':'application/x-www-form-urlencoded','Host':'game.yunyoushijie.net'}#line:211
        OO00OO00OO0O00OO0 ='token_value='+O0O0OO0O0O0O0O0OO ['token_value']+'&token_key='+O0O0OO0O0O0O0O0OO ['token_key']+'&service_time='+OO0O0OO0OOO000000 #line:213
        O000OOO0000000O0O =quote (AES_Encrypt (key =O00OOO0O000O00O00 ,data =OO00OO00OO0O00OO0 ),'utf-8')#line:214
        O0000O00OOO0000O0 =str ('token_value='+O0O0OO0O0O0O0O0OO ['token_value']+'&token_key='+O0O0OO0O0O0O0O0OO ['token_key']+'&service_time='+OO0O0OO0OOO000000 +'&l_sign='+O000OOO0000000O0O )#line:216
        OO0OOOO00O0000OO0 =json .loads (AES_Decrypt (O00OOO0O000O00O00 ,await post_json (f'{host}/build/plainList',headers =O0OO00000OO00O0OO ,data =O0000O00OOO0000O0 )))#line:217
        if 'code'in OO0OOOO00O0000OO0 :#line:218
            if OO0OOOO00O0000OO0 ['code']==10000 :#line:219
                for O0OO0OOOOOO0O00O0 in OO0OOOO00O0000OO0 ['result']['list']:#line:220
                    O00O0O0000OO0O0O0 =O0OO0OOOOOO0O00O0 ['level']#line:221
                    if O00O0O0000OO0O0O0 :#line:222
                        O0OO00O000O000000 .append (O00O0O0000OO0O0O0 )#line:223
                    else :#line:224
                        O0OO00O000O000000 .append (0 )#line:225
        if float (O0OO00O000O000000 [0 ])>1 :#line:226
            O0OO00O0000OOO000 =max (O0OO00O000O000000 )#line:227
            return O0OO00O0000OOO000 #line:228
    except Exception as O0O00000OO000O0OO :#line:229
        print (O0O00000OO000O0OO )#line:230
async def buy_synthesis (O0O0O00000000O0OO ,OO000O0000OO0O0OO ):#line:234
    try :#line:235
        O0OO00000000OO00O =await largest (O0O0O00000000O0OO )#line:236
        while True :#line:237
            OOO00O0OOOOO0OO00 =[]#line:238
            await asyncio .sleep (random .randint (5 ,8 )/10 )#line:240
            OO0OO0O00OO0OOO00 =generator (16 )#line:242
            OOO0OOO0OOO0OOOOO =str (int (time .time ()))#line:243
            OOOO0O0O0O0000OOO ={'sKey':public_key_encrypt (OO0OO0O00OO0OOO00 ),'user-agent':'Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Html5Plus/1.0 (Immersed/44) uni-app','Content-Type':'application/x-www-form-urlencoded','Host':'game.yunyoushijie.net'}#line:246
            O000O0OO0000O00OO ='token_value='+O0O0O00000000O0OO ['token_value']+'&token_key='+O0O0O00000000O0OO ['token_key']+'&service_time='+OOO0OOO0OOO0OOOOO #line:248
            O0OO00OO0OO0O0O00 =quote (AES_Encrypt (key =OO0OO0O00OO0OOO00 ,data =O000O0OO0000O00OO ),'utf-8')#line:249
            O0O0O00OOOOO0O00O =str ('token_value='+O0O0O00000000O0OO ['token_value']+'&token_key='+O0O0O00000000O0OO ['token_key']+'&service_time='+OOO0OOO0OOO0OOOOO +'&l_sign='+O0OO00OO0OO0O0O00 )#line:251
            OOO000O0O00OOO00O =json .loads (AES_Decrypt (OO0OO0O00OO0OOO00 ,await post_json (f'{host}/build/getposition',headers =OOOO0O0O0O0000OOO ,data =O0O0O00OOOOO0O00O )))#line:252
            if 'code'in OOO000O0O00OOO00O :#line:253
                if OOO000O0O00OOO00O ['code']==10000 :#line:254
                    if OOO000O0O00OOO00O ['result']['list']:#line:255
                        for OOOO0OOO0O0OO00O0 in OOO000O0O00OOO00O ['result']['list']:#line:256
                            OO0O0OOO00OO00OOO =OOOO0OOO0O0OO00O0 ['level']#line:257
                            OO0000O00O0OO0O0O =OOOO0OOO0O0OO00O0 ['seat']#line:258
                            if OO0O0OOO00OO00OOO :#line:259
                                OOO00O0OOOOO0OO00 .append (OO0O0OOO00OO00OOO )#line:260
                                if O0OO00000000OO00O -lve_l >int (OO0O0OOO00OO00OOO ):#line:261
                                    O0O0OOO00O0O0O00O =str ('token_value='+O0O0O00000000O0OO ['token_value']+'&token_key='+O0O0O00000000O0OO ['token_key']+'&service_time='+OOO0OOO0OOO0OOOOO +'&l_sign='+O0OO00OO0OO0O0O00 +f'&seat={OO0000O00O0OO0O0O}')#line:262
                                    OOOOO0O0O0O0OOO00 =json .loads (AES_Decrypt (OO0OO0O00OO0OOO00 ,await post_json (f'{host}/build/recycled',headers =OOOO0O0O0O0000OOO ,data =O0O0OOO00O0O0O00O )))#line:263
                                    if 'code'in OOOOO0O0O0O0OOO00 :#line:264
                                        if OOOOO0O0O0O0OOO00 ['code']==10000 :#line:265
                                            print (f'[账号{OO000O0000OO0O0OO + 1}]建筑回收->位置:{OO0000O00O0OO0O0O}丨{OOOOO0O0O0O0OOO00["message"]}')#line:266
                            else :#line:267
                                if await buy_build (O0O0O00000000O0OO ,OO000O0000OO0O0OO ,OO0000O00O0OO0O0O ):#line:268
                                    OO00000O0O00O0O00 =json .loads (AES_Decrypt (OO0OO0O00OO0OOO00 ,await post_json (f'{host}/task/config',headers =OOOO0O0O0O0000OOO ,data =O0O0O00OOOOO0O00O )))#line:269
                                    await post_json (f'{host}/member2/activeFriend',headers =OOOO0O0O0O0000OOO ,data =O0O0O00OOOOO0O00O )#line:270
                                    if 'code'in OO00000O0O00O0O00 :#line:271
                                        if OO00000O0O00O0O00 ['code']==10000 :#line:272
                                            OOOOOO0O0O00O00O0 =OO00000O0O00O0O00 ['result'][5 ]['surplus_num']#line:273
                                            OO0OO00O0000O0000 =OO00000O0O00O0O00 ['result'][5 ]['total_income']#line:274
                                            print (f'[账号{OO000O0000OO0O0OO + 1}]银币广告:获取:{int(OO0OO00O0000O0000 / 1000000000000000)}AA丨剩余{OOOOOO0O0O00O00O0}次')#line:275
                                            if OOOOOO0O0O00O00O0 >0 :#line:276
                                                if await income_offline (O0O0O00000000O0OO ,OO000O0000OO0O0OO ,6 ,'银币广告'):#line:277
                                                    break #line:278
                                            else :#line:279
                                                return True #line:280
                    for OOOOO0O000OOO00O0 in OOO00O0OOOOO0OO00 :#line:282
                        O000OOOO0000O0OO0 =find_member_positions (OOOOO0O000OOO00O0 ,OOO00O0OOOOO0OO00 )#line:283
                        if len (O000OOOO0000O0OO0 )>kdj and 36 in OOO00O0OOOOO0OO00 :#line:284
                            if OOOOO0O000OOO00O0 >0 :#line:285
                                await compose_build (O0O0O00000000O0OO ,OO000O0000OO0O0OO ,int (O000OOOO0000O0OO0 [0 ])+1 ,int (O000OOOO0000O0OO0 [1 ])+1 )#line:286
                                break #line:287
                        elif len (O000OOOO0000O0OO0 )>1 :#line:288
                            if OOOOO0O000OOO00O0 >0 and OOOOO0O000OOO00O0 !=37 :#line:289
                                await compose_build (O0O0O00000000O0OO ,OO000O0000OO0O0OO ,int (O000OOOO0000O0OO0 [0 ])+1 ,int (O000OOOO0000O0OO0 [1 ])+1 )#line:290
                                break #line:291
    except Exception as OOO0OOO000O00O0O0 :#line:292
        print (OOO0OOO000O00O0O0 )#line:293
async def compose_build (OOO0O0O00OO00OOO0 ,O0O00OO0O0OOO0O00 ,O0O0000OOO0OOOO00 ,OO0OO00OOO00OOOO0 ):#line:297
    try :#line:298
        await asyncio .sleep (random .randint (2 ,4 )/10 )#line:299
        O0O0O0OOO0O00OO0O =generator (16 )#line:300
        OOOO0O000O0OOOO00 =str (int (time .time ()))#line:301
        O00O000O0OO000O0O ={'sKey':public_key_encrypt (O0O0O0OOO0O00OO0O ),'user-agent':'Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Html5Plus/1.0 (Immersed/44) uni-app','Content-Type':'application/x-www-form-urlencoded','Host':'game.yunyoushijie.net'}#line:304
        O000O00O0O0OOO0OO ='token_value='+OOO0O0O00OO00OOO0 ['token_value']+'&token_key='+OOO0O0O00OO00OOO0 ['token_key']+'&service_time='+OOOO0O000O0OOOO00 #line:306
        O0O00O00OO00O0O00 =quote (AES_Encrypt (key =O0O0O0OOO0O00OO0O ,data =O000O00O0O0OOO0OO ),'utf-8')#line:307
        O000OO00O00O00O00 =str ('token_value='+OOO0O0O00OO00OOO0 ['token_value']+'&token_key='+OOO0O0O00OO00OOO0 ['token_key']+'&service_time='+OOOO0O000O0OOOO00 +'&l_sign='+O0O00O00OO00O0O00 +'&two='+str (O0O0000OOO0OOOO00 )+'&one='+str (OO0OO00OOO00OOOO0 ))#line:309
        OO0O00OO0000OOO0O =json .loads (AES_Decrypt (O0O0O0OOO0O00OO0O ,await post_json (f'{host}/build/composeBuild',headers =O00O000O0OO000O0O ,data =O000OO00O00O00O00 )))#line:310
        if 'code'in OO0O00OO0000OOO0O :#line:313
            if OO0O00OO0000OOO0O ['code']==10000 :#line:314
                print (f'[账号{O0O00OO0O0OOO0O00 + 1}]建筑合成->{O0O0000OOO0OOOO00} 🔗 {OO0OO00OOO00OOOO0}')#line:315
            else :#line:316
                print (OO0O00OO0000OOO0O )#line:317
    except Exception as O0OOO0000O0OO00O0 :#line:318
        print (O0OOO0000O0OO00O0 )#line:319
async def buy_build (OOO00O0OOOO0OO0O0 ,OO0O0O00000OOOOO0 ,O00O000OOO0000OO0 ):#line:323
    try :#line:324
        await asyncio .sleep (random .randint (2 ,4 )/10 )#line:325
        OO00OOO0OOO00O000 =generator (16 )#line:326
        O000O0O0O0OO0O0O0 =str (int (time .time ()))#line:327
        OO0OOOO00OO0O0O0O ={'sKey':public_key_encrypt (OO00OOO0OOO00O000 ),'user-agent':'Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Html5Plus/1.0 (Immersed/44) uni-app','Content-Type':'application/x-www-form-urlencoded','Host':'game.yunyoushijie.net'}#line:330
        O00O00OO000O000O0 ='token_value='+OOO00O0OOOO0OO0O0 ['token_value']+'&token_key='+OOO00O0OOOO0OO0O0 ['token_key']+'&service_time='+O000O0O0O0OO0O0O0 #line:332
        O00000OOOO000O0O0 =quote (AES_Encrypt (key =OO00OOO0OOO00O000 ,data =O00O00OO000O000O0 ),'utf-8')#line:333
        O00O000O0000O00OO =str ('token_value='+OOO00O0OOOO0OO0O0 ['token_value']+'&token_key='+OOO00O0OOOO0OO0O0 ['token_key']+'&service_time='+O000O0O0O0OO0O0O0 +'&l_sign='+O00000OOOO000O0O0 +'&seat='+str (O00O000OOO0000OO0 ))#line:335
        OO0O00000O00O0O00 =json .loads (AES_Decrypt (OO00OOO0OOO00O000 ,await post_json (f'{host}/build/buyBuild',headers =OO0OOOO00OO0O0O0O ,data =O00O000O0000O00OO )))#line:336
        if 'code'in OO0O00000O00O0O00 :#line:338
            if OO0O00000O00O0O00 ['code']==10000 :#line:339
                return False #line:340
            if OO0O00000O00O0O00 ['code']==10001 :#line:341
                print (f'[账号{OO0O0O00000OOOOO0 + 1}]购买建筑->{OO0O00000O00O0O00["message"]}')#line:342
                return True #line:343
            return True #line:344
    except Exception as OOOO0OOOO0000OOO0 :#line:345
        print (OOOO0OOOO0000OOO0 )#line:346
async def bind_parent (OO0000O0O0O0OOOOO ):#line:350
    try :#line:351
        OOO000000O00OO0O0 =generator (16 )#line:352
        O000OO0O00O00O0OO =str (int (time .time ()))#line:353
        OOO00O0OOO00OO000 ={'sKey':public_key_encrypt (OOO000000O00OO0O0 ),'user-agent':'Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Html5Plus/1.0 (Immersed/44) uni-app','Content-Type':'application/x-www-form-urlencoded','Host':'game.yunyoushijie.net'}#line:356
        O0000O0OO00000OO0 ='token_value='+OO0000O0O0O0OOOOO ['token_value']+'&token_key='+OO0000O0O0O0OOOOO ['token_key']+'&service_time='+O000OO0O00O00O0OO #line:358
        O00O0O0OOOOOOO0OO =quote (AES_Encrypt (key =OOO000000O00OO0O0 ,data =O0000O0OO00000OO0 ),'utf-8')#line:359
        O0O00O0O0OO0O00OO =str ('token_value='+OO0000O0O0O0OOOOO ['token_value']+'&token_key='+OO0000O0O0O0OOOOO ['token_key']+'&service_time='+O000OO0O00O00O0OO +'&l_sign='+O00O0O0OOOOOOO0OO )#line:361
        OO0OOOOO0OOOO0OOO =json .loads (AES_Decrypt (OOO000000O00OO0O0 ,await post_json (f'{host}/team/inviteInfo',headers =OOO00O0OOO00OO000 ,data =O0O00O0O0OO0O00OO )))#line:362
        if 'code'in OO0OOOOO0OOOO0OOO :#line:363
            if OO0OOOOO0OOOO0OOO ['code']==10000 :#line:364
                if not OO0OOOOO0OOOO0OOO ['result']:#line:365
                    O0O00OO00O0O0O0O0 =str ('token_value='+OO0000O0O0O0OOOOO ['token_value']+'&token_key='+OO0000O0O0O0OOOOO ['token_key']+'&service_time='+O000OO0O00O00O0OO +'&l_sign='+O00O0O0OOOOOOO0OO +'&user_code=1956785')#line:367
                    OO000O00O000OO00O =json .loads (AES_Decrypt (OOO000000O00OO0O0 ,await post_json (f'{host}/member/bindParent',headers =OOO00O0OOO00OO000 ,data =O0O00OO00O0O0O0O0 )))#line:368
                    if 'code'in OO000O00O000OO00O :#line:369
                        if OO000O00O000OO00O ['code']==10000 :#line:370
                            pass #line:371
    except Exception as OO0O0O00O0O0OO0OO :#line:372
        print (OO0O0O00O0O0OO0OO )#line:373
async def add_ticket_to_activity (O000OO00OO0OOOO00 ,O0OOOO0O0O00O00OO ):#line:377
    try :#line:378
        O000OO000O0OOO000 =generator (16 )#line:379
        O000OOOOOO0OOOO00 =str (int (time .time ()))#line:380
        O00O0OOOOOO0OOOOO ={'sKey':public_key_encrypt (O000OO000O0OOO000 ),'user-agent':'Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Html5Plus/1.0 (Immersed/44) uni-app','Content-Type':'application/x-www-form-urlencoded','Host':'game.yunyoushijie.net'}#line:383
        O0OOOOOO00O0OO000 ='token_value='+O000OO00OO0OOOO00 ['token_value']+'&token_key='+O000OO00OO0OOOO00 ['token_key']+'&service_time='+O000OOOOOO0OOOO00 #line:385
        OOO000000OO0O0O0O =quote (AES_Encrypt (key =O000OO000O0OOO000 ,data =O0OOOOOO00O0OO000 ),'utf-8')#line:386
        O0OO0OO0OO0000OO0 =str ('token_value='+O000OO00OO0OOOO00 ['token_value']+'&token_key='+O000OO00OO0OOOO00 ['token_key']+'&service_time='+O000OOOOOO0OOOO00 +'&l_sign='+OOO000000OO0O0O0O )#line:388
        O00OOO0O00OOO0O00 =json .loads (AES_Decrypt (O000OO000O0OOO000 ,await post_json (f'{host}/ticket.ticket/getMyTicket',headers =O00O0OOOOOO0OOOOO ,data =O0OO0OO0OO0000OO0 )))#line:389
        if 'code'in O00OOO0O00OOO0O00 :#line:390
            if O00OOO0O00OOO0O00 ['code']==10000 :#line:391
                O00O00O0O0O0OO0OO =O00OOO0O00OOO0O00 ['result']#line:392
                for OO0OO0OOO00O000O0 in O00O00O0O0O0OO0OO :#line:393
                    O000OO00OO0OOOOO0 =OO0OO0OOO00O000O0 ['free_number']#line:394
                    if float (O000OO00OO0OOOOO0 )>0 :#line:395
                        O0O00O000OO0OO000 ={'sKey':public_key_encrypt (O000OO000O0OOO000 ),'versionCode':'300','user-agent':'Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Html5Plus/1.0 (Immersed/44) uni-app','Content-Type':'application/x-www-form-urlencoded','Host':'game.yunyoushijie.net'}#line:398
                        O0OOOOOO00O0OO000 ='token_value='+O000OO00OO0OOOO00 ['token_value']+'&token_key='+O000OO00OO0OOOO00 ['token_key']+'&service_time='+O000OOOOOO0OOOO00 +'&active_id=1'#line:400
                        OOO000000OO0O0O0O =quote (AES_Encrypt (key =O000OO000O0OOO000 ,data =O0OOOOOO00O0OO000 ),'utf-8')#line:401
                        OO00O00OO00O00OO0 =str ('token_value='+O000OO00OO0OOOO00 ['token_value']+'&token_key='+O000OO00OO0OOOO00 ['token_key']+'&active_id=1'+'&service_time='+O000OOOOOO0OOOO00 +'&l_sign='+OOO000000OO0O0O0O )#line:402
                        OO0OO000OO0O0O0OO =json .loads (AES_Decrypt (O000OO000O0OOO000 ,await post_json (f'{host}/ticket.ticket/addTicketToActivity',headers =O0O00O000OO0OO000 ,data =OO00O00OO00O00OO0 )))#line:403
                        if 'code'in OO0OO000OO0O0O0OO :#line:405
                            if OO0OO000OO0O0O0OO ['code']==10000 :#line:406
                                print (f'[账号{O0OOOO0O0O00O00OO + 1}]添加云券->{O000OO00OO0OOOOO0}丨{OO0OO000OO0O0O0OO["message"]}丨参与抽奖:{OO0OO000OO0O0O0OO["result"]["my_active_ticket"].split(".")[0]}云券')#line:408
                            else :#line:409
                                print (f'[账号{O0OOOO0O0O00O00OO + 1}]添加云券->{O000OO00OO0OOOOO0}丨{OO0OO000OO0O0O0OO["message"]}')#line:410
    except Exception as OOO00OOOOO00OOOOO :#line:411
        print (OOO00OOOOO00OOOOO )#line:412
async def turntable (OO000O000O0OO0000 ,OOO00OOOO00O00O0O ):#line:416
    try :#line:417
        while True :#line:418
            OO000000O000OO0O0 =generator (16 )#line:419
            O0O00000O0O0000O0 =str (int (time .time ()))#line:420
            OOO00OO00O0O0OOOO ={'sKey':public_key_encrypt (OO000000O000OO0O0 ),'user-agent':'Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Html5Plus/1.0 (Immersed/44) uni-app','Content-Type':'application/x-www-form-urlencoded','Host':'game.yunyoushijie.net'}#line:423
            O00000OO00000OOO0 ='token_value='+OO000O000O0OO0000 ['token_value']+'&token_key='+OO000O000O0OO0000 ['token_key']+'&service_time='+O0O00000O0O0000O0 #line:425
            OO00O0O00OOO000O0 =quote (AES_Encrypt (key =OO000000O000OO0O0 ,data =O00000OO00000OOO0 ),'utf-8')#line:426
            OOO0OO00O0O0OOOOO =str ('token_value='+OO000O000O0OO0000 ['token_value']+'&token_key='+OO000O000O0OO0000 ['token_key']+'&service_time='+O0O00000O0O0000O0 +'&l_sign='+OO00O0O00OOO000O0 )#line:428
            OO0OOO000OOOOOOO0 =json .loads (AES_Decrypt (OO000000O000OO0O0 ,await post_json (f'{host}/turntable.turntable/getTurntableRemainTimes',headers =OOO00OO00O0O0OOOO ,data =OOO0OO00O0O0OOOOO )))#line:429
            if 'code'in OO0OOO000OOOOOOO0 :#line:430
                if OO0OOO000OOOOOOO0 ['code']==10000 :#line:431
                    OO0OOOOOO0000OO00 =OO0OOO000OOOOOOO0 ['result']['remain_times']#line:432
                    O0O0000O000O000O0 =OO0OOO000OOOOOOO0 ['result']['reset_times']#line:433
                    print (f'[账号{OOO00OOOO00O00O0O + 1}]转盘抽奖->剩余重置次数:{O0O0000O000O000O0}丨剩余转盘次数:{OO0OOOOOO0000OO00}')#line:434
                    if OO0OOOOOO0000OO00 >0 :#line:435
                        OOOO00OO0O0O0OO0O =json .loads (AES_Decrypt (OO000000O000OO0O0 ,await post_json (f'{host}/turntable.turntable/turntable',headers =OOO00OO00O0O0OOOO ,data =OOO0OO00O0O0OOOOO )))#line:436
                        if 'code'in OOOO00OO0O0O0OO0O :#line:437
                            if OOOO00OO0O0O0OO0O ['code']==10000 :#line:438
                                print (f'[账号{OOO00OOOO00O00O0O + 1}]转盘抽奖->{OOOO00OO0O0O0OO0O["message"]}')#line:439
                            else :#line:440
                                print (OOOO00OO0O0O0OO0O )#line:441
                                break #line:442
                    else :#line:443
                        if O0O0000O000O000O0 >0 :#line:444
                            OO0OOOO00OO0O00OO =json .loads (AES_Decrypt (OO000000O000OO0O0 ,await post_json (f'{host}/turntable.turntable/turntableResetTime',headers =OOO00OO00O0O0OOOO ,data =OOO0OO00O0O0OOOOO )))#line:445
                            if 'code'in OO0OOOO00OO0O00OO :#line:446
                                if OO0OOOO00OO0O00OO ['code']==10000 :#line:447
                                    print (f'[账号{OOO00OOOO00O00O0O + 1}]转盘重置->{OO0OOOO00OO0O00OO["message"]}')#line:448
                        else :#line:449
                            break #line:450
            await asyncio .sleep (random .randint (1 ,2 ))#line:451
    except Exception as O0O0000OO00O0O0OO :#line:452
        print (O0O0000OO00O0O0OO )#line:453
async def build_box (O0O000O0O00OOO000 ,O00OOO0OOO0O0O0OO ):#line:457
    try :#line:458
        OO0O000OO00O0OO00 =generator (16 )#line:459
        O0OOOO0OO0OO0OO0O =str (int (time .time ()))#line:460
        OO0000OOO0OOO0OOO ={'sKey':public_key_encrypt (OO0O000OO00O0OO00 ),'user-agent':'Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Html5Plus/1.0 (Immersed/44) uni-app','Content-Type':'application/x-www-form-urlencoded','Host':'game.yunyoushijie.net'}#line:463
        O00O00OO00O000O00 ='token_value='+O0O000O0O00OOO000 ['token_value']+'&token_key='+O0O000O0O00OOO000 ['token_key']+'&service_time='+O0OOOO0OO0OO0OO0O #line:465
        OO00O0000O00OOOO0 =quote (AES_Encrypt (key =OO0O000OO00O0OO00 ,data =O00O00OO00O000O00 ),'utf-8')#line:466
        O00OO0O0000O0O0O0 =str ('token_value='+O0O000O0O00OOO000 ['token_value']+'&token_key='+O0O000O0O00OOO000 ['token_key']+'&service_time='+O0OOOO0OO0OO0OO0O +'&l_sign='+OO00O0000O00OOOO0 )#line:468
        O00OOOOOO00O0OOO0 =json .loads (AES_Decrypt (OO0O000OO00O0OO00 ,await post_json (f'{host}/task/config',headers =OO0000OOO0OOO0OOO ,data =O00OO0O0000O0O0O0 )))#line:469
        OOO00O00O0OOOO00O =json .loads (AES_Decrypt (OO0O000OO00O0OO00 ,await post_json (f'{host}/build/getKeyCount',headers =OO0000OOO0OOO0OOO ,data =O00OO0O0000O0O0O0 )))#line:470
        if 'code'in O00OOOOOO00O0OOO0 :#line:471
            if O00OOOOOO00O0OOO0 ['code']==10000 :#line:472
                OO00O0O000OO00O0O =O00OOOOOO00O0OOO0 ['result'][6 ]['surplus_num']#line:473
                print (f'[账号{O00OOO0OOO0O0O0OO + 1}]开启宝箱->剩余次数:{OO00O0O000OO00O0O}丨钥匙:{OOO00O00O0OOOO00O["result"]}')#line:474
                O00000000OO0OO000 =json .loads (AES_Decrypt (OO0O000OO00O0OO00 ,await post_json (f'{host}/build/getBoxList',headers =OO0000OOO0OOO0OOO ,data =O00OO0O0000O0O0O0 )))#line:475
                if OO00O0O000OO00O0O >0 :#line:477
                    if 'code'in O00000000OO0OO000 :#line:478
                        if O00000000OO0OO000 ['code']==10000 :#line:479
                            for OOO0O0OO0OOOOO000 in list (reversed (O00000000OO0OO000 ['result'])):#line:480
                                OO00O0O000000OOO0 =OOO0O0OO0OOOOO000 ['id']#line:481
                                if OOO0O0OO0OOOOO000 ['box_num']>1 :#line:482
                                    print (f'[账号{O00OOO0OOO0O0O0OO + 1}]开启宝箱->开启{OO00O0O000000OOO0}阶宝箱丨钥匙:{OOO00O00O0OOOO00O["result"]}')#line:483
                                    OOOOO0OO0OO0O0000 =str ('token_value='+O0O000O0O00OOO000 ['token_value']+'&token_key='+O0O000O0O00OOO000 ['token_key']+'&service_time='+O0OOOO0OO0OO0OO0O +'&l_sign='+OO00O0000O00OOOO0 +'&type_id=7&box_id='+str (OO00O0O000000OOO0 ))#line:485
                                    await asyncio .sleep (20 )#line:486
                                    OO0OOOOOO0O0OOOOO =json .loads (AES_Decrypt (OO0O000OO00O0OO00 ,await post_json (f'{host}/income/offline',headers =OO0000OOO0OOO0OOO ,data =OOOOO0OO0OO0O0000 )))#line:487
                                    if 'code'in OO0OOOOOO0O0OOOOO :#line:488
                                        if OO0OOOOOO0O0OOOOO ['code']==10000 :#line:489
                                            print (f'[账号{O00OOO0OOO0O0O0OO + 1}]宝箱广告->:获得:{OO0OOOOOO0O0OOOOO["result"]["name"]}数量:{OO0OOOOOO0O0OOOOO["result"]["val"]}')#line:491
                                        else :#line:492
                                            print (f'[账号{O00OOO0OOO0O0O0OO + 1}]宝箱广告->{OO0OOOOOO0O0OOOOO["message"]}')#line:493
                                    break #line:494
                if OOO00O00O0OOOO00O ["result"]:#line:495
                    for OOO0O0OO0OOOOO000 in list (reversed (O00000000OO0OO000 ['result'])):#line:496
                        OO00O0O000000OOO0 =OOO0O0OO0OOOOO000 ['id']#line:497
                        if OOO0O0OO0OOOOO000 ['box_num']>1 :#line:498
                            print (f'[账号{O00OOO0OOO0O0O0OO + 1}]钥匙开启宝箱->开启{OO00O0O000000OOO0}阶宝箱丨钥匙:{OOO00O00O0OOOO00O["result"]}')#line:499
                            OOOOO0OO0OO0O0000 =str ('token_value='+O0O000O0O00OOO000 ['token_value']+'&token_key='+O0O000O0O00OOO000 ['token_key']+'&service_time='+O0OOOO0OO0OO0OO0O +'&l_sign='+OO00O0000O00OOOO0 +'&type_id=7&box_id='+str (OO00O0O000000OOO0 ))#line:502
                            OO0OOOOOO0O0OOOOO =json .loads (AES_Decrypt (OO0O000OO00O0OO00 ,await post_json (f'{host}/build/drawBoxLottery',headers =OO0000OOO0OOO0OOO ,data =OOOOO0OO0OO0O0000 )))#line:504
                            if 'code'in OO0OOOOOO0O0OOOOO :#line:505
                                if OO0OOOOOO0O0OOOOO ['code']==10000 :#line:506
                                    print (f'[账号{O00OOO0OOO0O0O0OO + 1}]宝箱钥匙->:获得:{OO0OOOOOO0O0OOOOO["result"]["name"]}数量:{OO0OOOOOO0O0OOOOO["result"]["val"]}')#line:508
                                else :#line:509
                                    print (f'[账号{O00OOO0OOO0O0O0OO + 1}]宝箱钥匙->{OO0OOOOOO0O0OOOOO["message"]}')#line:510
                            break #line:511
    except Exception as OO0O0OOOO0OO00O0O :#line:512
        print (OO0O0OOOO0OO00O0O )#line:513
async def purchase_power (O0OO0O0O0OO00O0O0 ,OO0OO0OO000O0O0O0 ):#line:517
    try :#line:518
        OOO0O00OOOO0000OO =generator (16 )#line:519
        O000OOO00OO0OOO00 =str (int (time .time ()))#line:520
        O000OO0OOOO00O0OO ={'sKey':public_key_encrypt (OOO0O00OOOO0000OO ),'user-agent':'Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Html5Plus/1.0 (Immersed/44) uni-app','Content-Type':'application/x-www-form-urlencoded','Host':'game.yunyoushijie.net'}#line:523
        O0O0000OOO0000O0O ='token_value='+O0OO0O0O0OO00O0O0 ['token_value']+'&token_key='+O0OO0O0O0OO00O0O0 ['token_key']+'&service_time='+O000OOO00OO0OOO00 #line:525
        OO0OOO0OOO00OO0O0 =quote (AES_Encrypt (key =OOO0O00OOOO0000OO ,data =O0O0000OOO0000O0O ),'utf-8')#line:526
        O000OO0OOO0OO0O00 =str ('token_value='+O0OO0O0O0OO00O0O0 ['token_value']+'&token_key='+O0OO0O0O0OO00O0O0 ['token_key']+'&service_time='+O000OOO00OO0OOO00 +'&l_sign='+OO0OOO0OOO00OO0O0 +'&category_id=1')#line:528
        OO0OO0O00OOOO0000 =json .loads (AES_Decrypt (OOO0O00OOOO0000OO ,await post_json (f'{host}/task/config',headers =O000OO0OOOO00O0OO ,data =O000OO0OOO0OO0O00 )))#line:529
        if 'code'in OO0OO0O00OOOO0000 :#line:530
            if OO0OO0O00OOOO0000 ['code']==10000 :#line:531
                O0OOO00OOOOO0OO0O =OO0OO0O00OOOO0000 ['result'][4 ]['surplus_num']#line:532
                if O0OOO00OOOOO0OO0O >0 :#line:533
                    await asyncio .sleep (20 )#line:534
                    await income_offline (O0OO0O0O0OO00O0O0 ,OO0OO0OO000O0O0O0 ,5 ,'电量广告')#line:535
        O0000O0O0OO0O0O00 =json .loads (AES_Decrypt (OOO0O00OOOO0000OO ,await post_json (f'{host}/battery.battery/getUserBattery',headers =O000OO0OOOO00O0OO ,data =O000OO0OOO0OO0O00 )))#line:536
        if 'code'in O0000O0O0OO0O0O00 :#line:538
            if O0000O0O0OO0O0O00 ['code']==10000 :#line:539
                OOO0000OOOOOO0O00 =O0000O0O0OO0O0O00 ['result']['user_battery']['remaining_power']#line:541
                OO00OO000OO0OO00O =O0000O0O0OO0O0O00 ['result']['user_battery']['expired_time']#line:542
                O00OOOO0OOO0000OO =O0000O0O0OO0O0O00 ['result']['user_battery']['storage_remaining_power']#line:543
                print (f'[账号{OO0OO0OO000O0O0O0 + 1}]剩余电量->{str(OOO0000OOOOOO0O00).split(".")[0]}丨预计可用:{OO00OO000OO0OO00O}')#line:544
                if float (O00OOOO0OOO0000OO )<2 :#line:545
                    if float (OOO0000OOOOOO0O00 )<float (battery ):#line:546
                        OO0OO000O00O000O0 =str (99 -float (OOO0000OOOOOO0O00 )).split (".")[0 ]#line:547
                        if float (OO0OO000O00O000O0 )>1 :#line:548
                            O000OOOOO0O00O00O =str ('token_value='+O0OO0O0O0OO00O0O0 ['token_value']+'&token_key='+O0OO0O0O0OO00O0O0 ['token_key']+'&service_time='+O000OOO00OO0OOO00 +'&l_sign='+OO0OOO0OOO00OO0O0 +'&category_id=1'+'&number='+str (OO0OO000O00O000O0 ))#line:550
                            O00O000O0O0O0O000 =json .loads (AES_Decrypt (OOO0O00OOOO0000OO ,await post_json (f'{host}/battery.battery/purchasePower',headers =O000OO0OOOO00O0OO ,data =O000OOOOO0O00O00O )))#line:551
                            if 'code'in O00O000O0O0O0O000 :#line:552
                                if O00O000O0O0O0O000 ['code']==10000 :#line:553
                                    print (f'[账号{OO0OO0OO000O0O0O0 + 1}]购买电量->{O00O000O0O0O0O000["message"]}')#line:554
    except Exception as O00OO0OOO0OOO00O0 :#line:555
        print (O00OO0OOO0OOO00O0 )#line:556
async def build_my_backpack (O0OOO0OO0O0O00O00 ,OO0OO0OOO0OO00000 ):#line:560
    try :#line:561
        O00OO0O00OOO00OO0 =generator (16 )#line:562
        OOOOO000OOOOOO0OO =str (int (time .time ()))#line:563
        OOOO0O00O0OO0O000 ={'sKey':public_key_encrypt (O00OO0O00OOO00OO0 ),'user-agent':'Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Html5Plus/1.0 (Immersed/44) uni-app','Content-Type':'application/x-www-form-urlencoded','Host':'game.yunyoushijie.net'}#line:566
        OOOO0O00000000O00 =str ('token_value='+O0OOO0OO0O0O00O00 ['token_value']+'&token_key='+O0OOO0OO0O0O00O00 ['token_key']+'&service_time='+OOOOO000OOOOOO0OO +'&l_sign='+quote (AES_Encrypt (key =O00OO0O00OOO00OO0 ,data ='token_value='+O0OOO0OO0O0O00O00 ['token_value']+'&token_key='+O0OOO0OO0O0O00O00 ['token_key']+'&service_time='+OOOOO000OOOOOO0OO )))#line:570
        O0OO0O000O00OO0O0 =json .loads (AES_Decrypt (O00OO0O00OOO00OO0 ,await post_json (f'{host}/build/myBackpack',headers =OOOO0O00O0OO0O000 ,data =OOOO0O00000000O00 )))#line:571
        if 'code'in O0OO0O000O00OO0O0 :#line:572
            if O0OO0O000O00OO0O0 ['code']==10000 :#line:573
                if O0OO0O000O00OO0O0 ['result']:#line:574
                    OOO000OO00000O00O =O0OO0O000O00OO0O0 ['result'][0 ]['num']#line:575
                    OO0O00O0000OO0000 =O0OO0O000O00OO0O0 ['result'][0 ]['name']#line:576
                    print (f'[账号{OO0OO0OOO0OO00000 + 1}]合成建筑->{OO0O00O0000OO0000}丨{OOO000OO00000O00O}个')#line:577
    except Exception as OO00OOO00O00OOOOO :#line:578
        print (OO00OOO00O00OOOOO )#line:579
async def production (OOO00OOOO0OOO0OOO ,O00OOO00OO0OO0000 ):#line:583
    try :#line:584
        O0OOO00O0OO00000O =generator (16 )#line:585
        OOOOOO0O0O000OO0O =str (int (time .time ()))#line:586
        OOOO0O000OO0000O0 ={'sKey':public_key_encrypt (O0OOO00O0OO00000O ),'user-agent':'Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Html5Plus/1.0 (Immersed/44) uni-app','Content-Type':'application/x-www-form-urlencoded','Host':'game.yunyoushijie.net'}#line:589
        OO0OO0000OOO00O00 ='token_value='+OOO00OOOO0OOO0OOO ['token_value']+'&token_key='+OOO00OOOO0OOO0OOO ['token_key']+'&service_time='+OOOOOO0O0O000OO0O #line:591
        O0OOOO0O0OO000O00 =quote (AES_Encrypt (key =O0OOO00O0OO00000O ,data =OO0OO0000OOO00O00 ),'utf-8')#line:592
        OOOO0O00OO0OO0OO0 =str ('token_value='+OOO00OOOO0OOO0OOO ['token_value']+'&token_key='+OOO00OOOO0OOO0OOO ['token_key']+'&service_time='+OOOOOO0O0O000OO0O +'&l_sign='+O0OOOO0O0OO000O00 )#line:594
        OOO00OO0O0OO0O0O0 =json .loads (AES_Decrypt (O0OOO00O0OO00000O ,await post_json (f'{host}//build/receiveCoins',headers =OOOO0O000OO0000O0 ,data =OOOO0O00OO0OO0OO0 )))#line:595
        if 'code'in OOO00OO0O0OO0O0O0 :#line:596
            if OOO00OO0O0OO0O0O0 ['code']==10000 :#line:597
                OO0OO000O0O00O00O =OOO00OO0O0OO0O0O0 ['result']['ticket']#line:598
                OO000O0O000O00OOO =OOO00OO0O0OO0O0O0 ['result']['out_ticket']#line:599
                print (f'[账号{O00OOO00OO0OO0000 + 1}]生产云券->每小时产:{OO000O0O000O00OOO}张丨总券:{OO0OO000O0O00O00O}张')#line:600
    except Exception as O0OOOO00OOO0O0OOO :#line:601
        print (O0OOOO00OOO0O0OOO )#line:602
async def team_info (O0OO00OOO000000O0 ,OOO00OOOO00OOOOOO ):#line:606
    try :#line:607
        O0O0O0OOOOOO00O0O =generator (16 )#line:608
        O0O0O00O0OOO00OO0 =str (int (time .time ()))#line:609
        O00O00O00O00O00OO ={'sKey':public_key_encrypt (O0O0O0OOOOOO00O0O ),'user-agent':'Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Html5Plus/1.0 (Immersed/44) uni-app','Content-Type':'application/x-www-form-urlencoded','Host':'game.yunyoushijie.net'}#line:612
        OO00O000O000OO0O0 ='token_value='+O0OO00OOO000000O0 ['token_value']+'&token_key='+O0OO00OOO000000O0 ['token_key']+'&service_time='+O0O0O00O0OOO00OO0 #line:614
        O00OOOO0OOO000000 =quote (AES_Encrypt (key =O0O0O0OOOOOO00O0O ,data =OO00O000O000OO0O0 ),'utf-8')#line:615
        OOOOOO000O000O0O0 =str ('token_value='+O0OO00OOO000000O0 ['token_value']+'&token_key='+O0OO00OOO000000O0 ['token_key']+'&service_time='+O0O0O00O0OOO00OO0 +'&l_sign='+O00OOOO0OOO000000 )#line:617
        OO0OO0O0O00O00O0O =json .loads (AES_Decrypt (O0O0O0OOOOOO00O0O ,await post_json (f'{host}/team/teamInfo',headers =O00O00O00O00O00OO ,data =OOOOOO000O000O0O0 )))#line:618
        O00OO0O0O0OOO0O00 =json .loads (AES_Decrypt (O0O0O0OOOOOO00O0O ,await post_json (f'{host}/member2/activeFriend',headers =O00O00O00O00O00OO ,data =OOOOOO000O000O0O0 )))#line:619
        if 'code'in OO0OO0O0O00O00O0O :#line:623
            if OO0OO0O0O00O00O0O ['code']==10000 :#line:624
                OO0000OO0OOO00O00 =OO0OO0O0O00O00O0O ['result']['team_num']#line:625
                O0OO000OOO00OOOOO =len (O00OO0O0O0OOO0O00 ['result'])#line:626
                print (f'[账号{OOO00OOOO00OOOOOO + 1}]我的下级->总数:{OO0000OO0OOO00O00}丨活跃:{O0OO000OOO00OOOOO}')#line:627
                if O0OO000OOO00OOOOO <5 :#line:628
                    OOOOO0O00000000O0 =json .loads (AES_Decrypt (O0O0O0OOOOOO00O0O ,await post_json (f'{host}/member/info',headers =O00O00O00O00O00OO ,data =OOOOOO000O000O0O0 )))#line:629
                    if 'code'in OOOOO0O00000000O0 :#line:630
                        if OOOOO0O00000000O0 ['code']==10000 :#line:631
                            O00O000O0O000O0OO =OOOOO0O00000000O0 ['result']['id']#line:632
                            print (f'[账号{OOO00OOOO00OOOOOO + 1}]我的粉丝->活跃不足5人的ID:{O00O000O0O000O0OO}')#line:633
    except Exception as O0O0O0OOOO00OOOOO :#line:634
        print (O0O0O0OOOO00OOOOO )#line:635
async def build_getKeyCount (O000O0OO00O00OO00 ,O0O0O0OOOO0O000O0 ):#line:638
    try :#line:639
        OO00O00O000O00O0O =generator (16 )#line:640
        O0O00OO00O00OO0O0 =str (int (time .time ()))#line:641
        O00O000OOOOOOO0OO ={'sKey':public_key_encrypt (OO00O00O000O00O0O ),'user-agent':'Mozilla/5.0 (iPhone; CPU iPhone OS 14_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Html5Plus/1.0 (Immersed/44) uni-app','Content-Type':'application/x-www-form-urlencoded','Host':'game.yunyoushijie.net'}#line:644
        O00OO00O0O0000O0O ='token_value='+O000O0OO00O00OO00 ['token_value']+'&token_key='+O000O0OO00O00OO00 ['token_key']+'&service_time='+O0O00OO00O00OO0O0 #line:646
        OO000000OO00OOOOO =quote (AES_Encrypt (key =OO00O00O000O00O0O ,data =O00OO00O0O0000O0O ),'utf-8')#line:647
        OOOO0O0000O0O0O00 =str ('token_value='+O000O0OO00O00OO00 ['token_value']+'&token_key='+O000O0OO00O00OO00 ['token_key']+'&service_time='+O0O00OO00O00OO0O0 +'&l_sign='+OO000000OO00OOOOO )#line:649
        O0OO0000O00OO0OO0 =json .loads (AES_Decrypt (OO00O00O000O00O0O ,await post_json (f'{host}/build/getKeyCount',headers =O00O000OOOOOOO0OO ,data =OOOO0O0000O0O0O00 )))#line:650
        print (O0OO0000O00OO0OO0 )#line:651
    except Exception as O0000OO000OOOOOOO :#line:652
        print (O0000OO000OOOOOOO )#line:653
async def start (O0OO00O00O0O0OO0O ):#line:660
    print (f"==========共找到{len(O0OO00O00O0O0OO0O)}个账号==========")#line:661
    print (f"------------------打印账号信息------------------")#line:662
    for OOOO00000OO00O00O in O0OO00O00O0O0OO0O :#line:663
        print (f"------------------------------------")#line:664
        await member_info (OOOO00000OO00O00O ,O0OO00O00O0O0OO0O .index (OOOO00000OO00O00O ))#line:665
    print (f"------------------领取离线------------------")#line:666
    await asyncio .gather (*[asyncio .create_task (income_offline (OO000OOO0O0OOO0OO ,O0OO00O00O0O0OO0O .index (OO000OOO0O0OOO0OO ),8 ,'离线广告'))for OO000OOO0O0OOO0OO in O0OO00O00O0O0OO0O ])#line:667
    await asyncio .gather (*[asyncio .create_task (bind_parent (OO0000OOO00OOOO00 ))for OO0000OOO00OOOO00 in O0OO00O00O0O0OO0O ])#line:669
    print (f"------------------查询背包------------------")#line:670
    await asyncio .gather (*[asyncio .create_task (build_my_backpack (O0O0O000OO00OOOO0 ,O0OO00O00O0O0OO0O .index (O0O0O000OO00OOOO0 )))for O0O0O000OO00OOOO0 in O0OO00O00O0O0OO0O ])#line:671
    print (f"------------------添加云卷------------------")#line:672
    await asyncio .gather (*[asyncio .create_task (add_ticket_to_activity (OOOOOOOO0OO00OOO0 ,O0OO00O00O0O0OO0O .index (OOOOOOOO0OO00OOO0 )))for OOOOOOOO0OO00OOO0 in O0OO00O00O0O0OO0O ])#line:673
    print (f"------------------生产云卷------------------")#line:674
    await asyncio .gather (*[asyncio .create_task (production (O0O000O00OOOO0000 ,O0OO00O00O0O0OO0O .index (O0O000O00OOOO0000 )))for O0O000O00OOOO0000 in O0OO00O00O0O0OO0O ])#line:675
    print (f"------------------查询好友------------------")#line:676
    await asyncio .gather (*[asyncio .create_task (team_info (OO000O0OOO0000OOO ,O0OO00O00O0O0OO0O .index (OO000O0OOO0000OOO )))for OO000O0OOO0000OOO in O0OO00O00O0O0OO0O ])#line:677
    print (f"------------------转盘抽奖------------------")#line:678
    await asyncio .gather (*[asyncio .create_task (turntable (OO0000O0OOOO00OOO ,O0OO00O00O0O0OO0O .index (OO0000O0OOOO00OOO )))for OO0000O0OOOO00OOO in O0OO00O00O0O0OO0O ])#line:679
    print (f"------------------开宝箱------------------")#line:680
    await asyncio .gather (*[asyncio .create_task (build_box (OO000OOO0OO00OO00 ,O0OO00O00O0O0OO0O .index (OO000OOO0OO00OO00 )))for OO000OOO0OO00OO00 in O0OO00O00O0O0OO0O ])#line:681
    print (f"------------------购买电量------------------")#line:682
    await asyncio .gather (*[asyncio .create_task (purchase_power (O00OOOOO0O0O0000O ,O0OO00O00O0O0OO0O .index (O00OOOOO0O0O0000O )))for O00OOOOO0O0O0000O in O0OO00O00O0O0OO0O ])#line:683
    print (f"------------------购买合成------------------")#line:684
    await asyncio .gather (*[asyncio .create_task (buy_synthesis (O0O0O000OO0OOO0OO ,O0OO00O00O0O0OO0O .index (O0O0O000OO0OOO0OO )))for O0O0O000OO0OOO0OO in O0OO00O00O0O0OO0O ])#line:685
if __name__ =='__main__':#line:688
    try :#line:689
        O000OO000O0O00OOO00 ()#line:690
        print (f'你的卡密是：{OO00OO0OO0OO00OO00o0()}')#line:691
        O000OO0O00OO00O00 ()#line:692
        yy_token =json .load (open ("Roam_vip_data.json",'r'))['data']#line:693
        asyncio .run (start (yy_token ))#line:694
    except Exception as E :#line:695
        print (E )#line:696
